package com.mengtian_tech.smart_lab.entity.system;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.jeecgframework.poi.excel.annotation.Excel;

import com.mengtian_tech.smart_lab.entity.dict.DictCollegeEntity;
import com.mengtian_tech.smart_lab.entity.dict.DictMajorEntity;
import com.mengtian_tech.smart_lab.entity.dict.DictSeriesEntity;
import com.mengtian_tech.smart_lab.entity.dict.DictTeachGroupEntity;

/**
 * 系统用户表
 */
@Entity
@Table(name = "t_s_user")
@PrimaryKeyJoinColumn(name = "id")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class TSUser extends TSBaseUser implements java.io.Serializable {
	
	private static final long serialVersionUID = 132434333L;
	
	@Excel(name = "手机")
	private String mobilePhone;// 手机
	
	@Excel(name = "办公电话")
	private String officePhone;// 办公电话
	@Excel(name = "邮箱")
	private String email;// 邮箱	
	/** 学工号 */
	private String staffNo;	
	/**
	 * 是否已经登陆过
	 */
	private Integer hasLogined;// 0:没有登录过  1：登陆过
	
	private Integer attachId;
	
	/**
	 * 用户类型
	 * 1-前台用户
	 * 2-后台用户
	 */
	private Integer  userType;
	
	/**
	 * 一卡通卡号
	 */
	private String cardNo;
	
	/**性别*/
	@Excel(name="性别(0:男/1:女)",width=16)
	private java.lang.Integer sex;
	/**生日*/
	@Excel(name="生日",format = "yyyy-MM-dd")
	private java.util.Date birthday;
	//创建时间
	private java.util.Date createDate;
	/**专业*/
	@Excel(name="专业名称")
	private DictMajorEntity major;
	/**系别*/
	@Excel(name="系别名称")
	private DictSeriesEntity series;
	
	/** 学院代码  */
	private String collegeId;	
	/** 年级 */
	private String grade;	
	/** 班级名称  */
	private String className;
	 
	//角色名 
	private String roleName;
		
	private Integer deleted;
	
	//信誉积分
	private BigDecimal score;
	
	//考勤类型
	private String attendType; 
	
	private String englishName;
	private String py;
	private String oldName;
	private String birthplace;
	private String jg; //籍贯
	private String nation; //民族
	private String idNumber; //身份证号码
	private String zzmm; //政治面貌码
	private String jkzk; //健康状况码
	private String zjxy; //信仰宗教码
	private String blood;//血型
	private String isAlone; //是否独生子女
	private String scoreRemark;
	
	private DictTeachGroupEntity teachGroup;
	
	private DictCollegeEntity college;

	@Column(name = "mobilePhone", length = 30)
	public String getMobilePhone() {
		return this.mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	@Column(name = "officePhone", length = 20)
	public String getOfficePhone() {
		return this.officePhone;
	}

	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}

	@Column(name = "email", length = 50)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	} 

	public Integer getHasLogined() {
		return hasLogined;
	}

	public void setHasLogined(Integer hasLogined) {
		this.hasLogined = hasLogined;
	}

	public Integer getAttachId() {
		return attachId;
	}

	public void setAttachId(Integer attachId) {
		this.attachId = attachId;
	}

	/**
	 * 用户类型
	 * 1-学生用户
	 * 2-教师用户
	 * 4-临时用户（外部用户）
	 */
	public Integer getUserType() {
		return userType;
	}

	/**
	 * 用户类型
	 * 1-学生用户
	 * 2-教师用户
	 * 4-临时用户（外部用户）
	 */
	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getStaffNo() {
		return staffNo;
	}

	public void setStaffNo(String staffNo) {
		this.staffNo = staffNo;
	}

	public java.lang.Integer getSex() {
		return sex;
	}

	public void setSex(java.lang.Integer sex) {
		this.sex = sex;
	}

	public java.util.Date getBirthday() {
		return birthday;
	}

	public void setBirthday(java.util.Date birthday) {
		this.birthday = birthday;
	}

	@ManyToOne
	@JoinColumn(name="major_id")
	public DictMajorEntity getMajor() {
		return major;
	}

	public void setMajor(DictMajorEntity major) {
		this.major = major;
	}

	@ManyToOne
	@JoinColumn(name="series_id")
	public DictSeriesEntity getSeries() {
		return series;
	}

	public void setSeries(DictSeriesEntity series) {
		this.series = series;
	} 
	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

 
	public String getAttendType() {
		return attendType;
	}

	public void setAttendType(String attendType) {
		this.attendType = attendType;
	} 

	public String getEnglishName() {
		return englishName;
	}

	public void setEnglishName(String englishName) {
		this.englishName = englishName;
	}

	public String getPy() {
		return py;
	}

	public void setPy(String py) {
		this.py = py;
	}

	public String getOldName() {
		return oldName;
	}

	public void setOldName(String oldName) {
		this.oldName = oldName;
	}

	public String getBirthplace() {
		return birthplace;
	}

	public void setBirthplace(String birthplace) {
		this.birthplace = birthplace;
	}

	public String getJg() {
		return jg;
	}

	public void setJg(String jg) {
		this.jg = jg;
	}

	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	public String getIdNumber() {
		return idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public String getZzmm() {
		return zzmm;
	}

	public void setZzmm(String zzmm) {
		this.zzmm = zzmm;
	}

	public String getJkzk() {
		return jkzk;
	}

	public void setJkzk(String jkzk) {
		this.jkzk = jkzk;
	}

	public String getZjxy() {
		return zjxy;
	}

	public void setZjxy(String zjxy) {
		this.zjxy = zjxy;
	}

	public String getBlood() {
		return blood;
	}

	public void setBlood(String blood) {
		this.blood = blood;
	}

	public String getIsAlone() {
		return isAlone;
	}

	public void setIsAlone(String isAlone) {
		this.isAlone = isAlone;
	}

	public BigDecimal getScore() {
		return score;
	}

	public void setScore(BigDecimal score) {
		this.score = score;
	}

	@Override
	public String toString() {
		return getRealName();
	}

	@Column(name="college_id")
	public String getCollegeId() {
		return collegeId;
	}

	public void setCollegeId(String collegeId) {
		this.collegeId = collegeId;
	} 
 
	@Column(name="grade")
	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	@Column(name="class_name")
	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}
	@ManyToOne
	@JoinColumn(name="teach_group_id")
	public DictTeachGroupEntity getTeachGroup() {
		return teachGroup;
	}

	public void setTeachGroup(DictTeachGroupEntity teachGroup) {
		this.teachGroup = teachGroup;
	}

	public java.util.Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(java.util.Date createDate) {
		this.createDate = createDate;
	}

	public Integer getDeleted() {
		return deleted;
	}

	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}

	@Column(name="socre_remark",length=1000)
	public String getScoreRemark() {
		return scoreRemark;
	}

	public void setScoreRemark(String scoreRemark) {
		this.scoreRemark = scoreRemark;
	}

	@ManyToOne
	@JoinColumn(name="college_id",insertable=false,updatable=false,referencedColumnName="code")	
	public DictCollegeEntity getCollege() {
		return college;
	}

	public void setCollege(DictCollegeEntity college) {
		this.college = college;
	}	
	
}